package com.mofeng.myshop.mapper;

import com.mofeng.myshop.domain.po.UserInfo;
import com.mofeng.myshop.domain.po.UserPower;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户权限 Mapper 接口
 * </p>
 *
 * @author MoFeng
 * @since 2024-04-17
 */
public interface UserPowerMapper extends BaseMapper<UserPower> {

    @Select("SELECT * FROM `tb_user_power` WHERE `name` = #{name}")
    UserPower findPowerByName(@Param("name") String name);

    @Select("select * from `tb_user_power`")
    List<UserPower> finAll();

    @Select("select * from `tb_user_power` WHERE `number` = #{number}")
    UserPower findByNumber(@Param("number")int powerNumber);
}
